﻿using System;
using UtilZ.Dotnet.Ex.Communication.Base;
using UtilZ.Dotnet.Ex.Model;

namespace UtilZ.Dotnet.Ex.Communication.Net.Web
{
    /// <summary>
    /// WebSocket接收到数据输出事件参数
    /// </summary>
    public class WebSocketDataOutputArgs : DataOutputArgs
    {
        private readonly byte _opcode;
        /// <summary>
        /// 操作码
        /// </summary>
        public byte Opcode
        {
            get { return _opcode; }
        }



        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="linkInfo">连接信息</param>
        /// <param name="data">数据</param>
        /// <param name="opcode">操作码</param>
        public WebSocketDataOutputArgs(LinkInfoAbs linkInfo, DataSource data, byte opcode)
            : base(linkInfo, data)
        {
            this._opcode = opcode;
        }
    }
}
